module.exports = app => {
  app.use('/', require('./home'))
  app.use('/user', require('./user'))
  app.use('/signup', require('./signup'))
  app.use('/signin', require('./signin'))
  app.use('/signout', require('./signout'))
  app.use('/article', require('./article'))
  app.use('/anime', require('./anime'))
  app.use('/ep', require('./ep'))
  app.use('/play', require('./play'))
  app.use('/chat', require('./chat'))
  app.use('/comments', require('./comments'))
  app.use('/api', require('./api'))
  app.use('/test', require('./test'))
  app.use('/api/anime', require('./api/anime'))

  // 404 page
  app.use((req, res) => {
    if (!res.headersSent) {
      res.status(404).render('404')
    }
  })
}
